﻿@include('header') 

<body class="childrenBody">
<div id="list_member">
	<blockquote class="layui-elem-quote news_search" >
		<div style="display:inline-block;">
			<div class="layui-input-inline" style="font-size:18px;">
			  题库管理
			</div>
		</div>
		<div style="float:right;margin-right:10px;">
			<a href="javascript:void(0);" class="layui-btn layui-btn-normal newsAdd_btn" onclick="member_add();">添加成员</a>
		</div>
	 
	  <div style="float:right;margin-right:20px;">
			<a class="layui-btn audit_btn" href="index.php?do=member&download=1">导出评分结果</a>
		</div>
	</blockquote>
	<div class="layui-form news_list" id="ajax_dom">
		<table class="layui-table">
			<thead>
				<tr>
					<th>姓名</th>
					<th>工号</th>
					<th>电话</th> 
					<th>总分</th>
					<th>所属小组</th>
					<th>评分状态</th>
					<th>操作</th> 
				</tr>
			</thead>
			<tbody class="news_content" >
				{loop $list_arr $k $v}
				<tr> 
					<td>$v[realname]</td>
					<td>$v[job_id]</td>
					<td>$v[telephone]</td> 
					<td>$v[score]</td> 
					<td>$group_arr[$v[group_id]]</td> 
					<td>
						{if $v[status]=="2"}
							<font color=green>已结束</font>
						{else} 
							未开始
						{/if}
					</td> 
					<td>
						<a class="layui-btn layui-btn-mini news_edit" style="background-color:#1E9FFF" href="javascript:void(0);" onclick="score_info($v[id]);">
							<i class="iconfont icon-edit"></i> 查看详情
						</a>
						<a class="layui-btn layui-btn-mini news_edit" href="javascript:void(0);" onclick="member_edit($v[id])">
							<i class="iconfont icon-edit"></i> 编辑
						</a>
						<a class="layui-btn layui-btn-danger layui-btn-mini news_del" href="javascript:del($v[id],$v[group_id],$page);" >
							<i class="iconfont icon-prohibit"></i> 删除
						</a>
						 
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
	 	 <div class="page" >$pages[page]</div>
	</div>
</div>		

 <script>
 //删除用户
 function del(id,group_id,page){ 
	 art.dialog({
		    content: '确认删除该用户?',
		    icon: 'question',
		   	lock: true,
		   	drag: false,
		   	background: '#000',
		   	opacity: 0.7,
		    ok: function (){
		    	 location.href='index.php?do=member&id='+id+'&page='+page+'&act=del&group_id='+group_id;
		    },
		    okVal: '确定',
		    cancelVal: '取消',
		    cancel: true
		});
 }
 
 //用户信息编辑
 function member_edit(sid){	
	 art.dialog.open('index.php?do=member_edit&member_id='+sid,{title:'用户信息编辑',close:function (){
		  location.href=location.href;
	 }});
 }
 
 //单个成员添加
 function member_add(){
	 art.dialog.open('index.php?do=member_add',{width:'380px',title:'添加用户',close:function (){
		  location.href=location.href;
	 }});
 }
 
 //查看详情
 function score_info(id){
	 art.dialog.open('index.php?do=member_score&id='+id,{width:'750px',height:'500px',title:'用户得分详情'}); 
 }
 
 </script>
 
 
 
@include('footer') 